<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::get('/getBanner', [\App\Http\Controllers\ShowController::class, 'index']);

Route::get('/getTopAd', [\App\Http\Controllers\ShowController::class, 'index']);

Route::get('/getBottomAd', [\App\Http\Controllers\ShowController::class, 'index']);

// 客户详情
Route::get('/customer/detail', [\App\Http\Controllers\CustomerController::class, 'detail']);

// 编辑客户信息
Route::put('/customer/update', [\App\Http\Controllers\CustomerController::class, 'update']);

// 客户收货地址
Route::get('/customer-address', [\App\Http\Controllers\CustomerAddressController::class, 'index']);

// 新增客户收货地址
Route::post('/customer-address', [\App\Http\Controllers\CustomerAddressController::class, 'save']);

// 更新客户收货地址
Route::post('/update-customer-address', [\App\Http\Controllers\CustomerAddressController::class, 'update']);

// 客户优惠券列表
Route::get('/customer-market', [\App\Http\Controllers\CustomerMarketController::class, 'index']);

// 充值列表
Route::get('/recharge', [\App\Http\Controllers\RechargeController::class, 'index']);

// 客户充值列表
Route::get('/capital-flow', [\App\Http\Controllers\CapitalFlowController::class, 'index']);

// 门店列表
Route::get('/store', [\App\Http\Controllers\StoreController::class, 'index']);

// 门店城市
Route::get('/store/city-store', [\App\Http\Controllers\StoreController::class, 'cityStore']);

// 产品分类
Route::get('/product-type', [\App\Http\Controllers\ProductTypeController::class, 'index']);

// 产品列表
Route::get('/product', [\App\Http\Controllers\ProductController::class, 'index']);

// 产品列表
Route::get('/product/kcal', [\App\Http\Controllers\ProductController::class, 'kcal']);

// 清空购物车
Route::get('/product/kcal-product', [\App\Http\Controllers\ProductController::class, 'kcalProduct']);

// 获取openid
Route::get('/openid', [\App\Http\Controllers\CommonController::class, 'openid']);

// 登录
Route::post('/login', [\App\Http\Controllers\CommonController::class, 'login']);

// 资金流水
Route::get('/capital-flow', [\App\Http\Controllers\CapitalFlowController::class, 'index']);

// 购物车列表
Route::get('/cart', [\App\Http\Controllers\CartController::class, 'index']);

// 添加购物车
Route::post('/cart/add', [\App\Http\Controllers\CartController::class, 'add']);

// 清空购物车
Route::post('/cart/add', [\App\Http\Controllers\CartController::class, 'clear']);

// 订单列表
Route::get('/order-sa', [\App\Http\Controllers\CartController::class, 'index']);

// 新增订单
Route::post('/order-sa', [\App\Http\Controllers\CartController::class, 'add']);


